<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib  uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>   
<%@ taglib  uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>this is the test pagination jsp</title>
	<style type="text/css">
	  .goodsDiv{
	         positon:relative;
	         width:100px;
	         height:30px;
	         border:1px;
	      }	         
	</style>
  </head>
  <body>
        <s:iterator value="pageList" id="goods" status="s">
            <div class="goodsDiv"><s:property value="#goods.goodName"/></div>
        </s:iterator>
        <div class="digg">
        <pg:pager items="${pager.totalPageCount}" url="${pageUrl}" maxPageItems="1" export="currentPageNumber=pageNumber"  >   
            <pg:index>   
               <pg:first><a href="${pageUrl}"><nobr>[首页]</nobr></a></pg:first>   
               <pg:prev><a href="${pageUrl}">前一页</a></pg:prev>   
               <pg:pages>   
                     <c:choose>   
                        <c:when test="${currentPageNumber eq pageNumber}">     
                           <font color="red">${pageNumber}</font>   
                        </c:when>     
                        <c:otherwise>     
                           <a href="${pageUrl}">${pageNumber}</a>    
                        </c:otherwise>     
                     </c:choose>   
               </pg:pages>   
               <pg:next><a href="${pageUrl}">下一页</a></pg:next>   
               <pg:last><a href="${pageUrl}"><nobr>[尾页]</nobr></a></pg:last>   
            </pg:index>       
        </pg:pager>
        
			<span class="Right">记录总数：${pager.totalSize}  总页数：${pager.totalPageCount}</span>
		</div>
        
  </body>
</html>